[POWERPC][LIBXC] Fix pointer math in ft_add_rsvmap(), rename string block to match...
authorRyan Harper <ryanh@us.ibm.com>
Thu, 11 Jan 2007 19:39:27 +0000 (13:39 -0600)
committerRyan Harper <ryanh@us.ibm.com>
Thu, 11 Jan 2007 19:39:27 +0000 (13:39 -0600)
Signed-off-by: Ryan Harper <ryanh@us.ibm.com>
Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
--HG--
extra : transplant_source : %D6H%17U%AD%E6%FB%E7-%8EQ%91%91%F1%21%60%F9%2C%D5%17

tools/libxc/powerpc64/flatdevtree.c
tools/libxc/powerpc64/flatdevtree.h

index f7a44bad7f4e8a38ab8062792d05f572f6eff51b..275e0884a6ac09edfb256558c7f00a040dc266e9 100644 (file)
@@ -14,7 +14,7 @@
  * Foundation, 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
  *
  * Copyright Pantelis Antoniou 2006
- * Copyright (C) IBM Corporation 2006
+ * Copyright IBM Corporation 2006, 2007
  * 2006 (c) MontaVista, Software, Inc.
  *
  * Authors: Pantelis Antoniou <pantelis@embeddedalley.com>
@@ -209,7 +209,7 @@ void ft_add_rsvmap(struct ft_cxt *cxt, u64 physaddr, u64 size)
        ((u64 *) cxt->pres)[0] = cpu_to_be64(physaddr); /* phys = 0, size = 0, terminate */
        ((u64 *) cxt->pres)[1] = cpu_to_be64(size);
 
-       cxt->pres += 18;        /* advance */
+       cxt->pres += 16;        /* advance two u64s worth */
 
        ((u64 *) cxt->pres)[0] = 0;     /* phys = 0, size = 0, terminate */
        ((u64 *) cxt->pres)[1] = 0;
@@ -318,6 +318,9 @@ int ft_end_tree(struct ft_cxt *cxt)
        cxt->pstr_begin = cxt->p_begin + cxt->struct_size;
        cxt->pstr = cxt->pstr_begin + cxt->strings_size;
 
+       /* mark the size of string structure in bph */
+       bph->size_dt_strings = cxt->strings_size;
+
        return 0;
 }
 
index 794bcd4f78ba758ba91060a1b6b228e7134bd931..2167cae91cd788e548925fbe0a56001b3afecd71 100644 (file)
@@ -40,7 +40,7 @@ struct boot_param_header {
        /* version 2 fields below */
        u32 boot_cpuid_phys;    /* Physical CPU id we're booting on */
        /* version 3 fields below */
-       u32 dt_strings_size;    /* size of the DT strings block */
+       u32 size_dt_strings;    /* size of the DT strings block */
 };
 
 struct ft_cxt {